package com.ly.mybatis.interceptor;
import	java.sql.Statement;

import org.apache.ibatis.executor.resultset.ResultSetHandler;
import org.apache.ibatis.plugin.*;

/**
 * @Classname MyResultSetHandler
 * @Description TODO
 * @Date 2021/1/20 20:12
 * @Author 冷心影翼
 */
@Intercepts({@Signature(type = ResultSetHandler.class,method = "handleResultSets",args = {Statement.class})})
public class MyResultSetHandler implements Interceptor {

    @Override
    public Object intercept(Invocation invocation) throws Throwable {
        System.out.println("do interceptor");
        return invocation.proceed();
    }

    @Override
    public Object plugin(Object target) {
        return Plugin.wrap(target,this);
    }
}
